(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
purge(nil) → nil
purge(add(z0, z1)) → add(z0, purge(rm(z0, z1)))
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
K tuples:none
Defined Rule Symbols:

eq, rm, ifrm, purge

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
We considered the (Usable) Rules:

rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
And the Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(EQ(x1, x2)) = 0   
POL(IFRM(x1, x2, x3)) = 0   
POL(PURGE(x1)) = x1   
POL(RM(x1, x2)) = 0   
POL(add(x1, x2)) = [4] + x2   
POL(c3(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c7(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(eq(x1, x2)) = 0   
POL(false) = 0   
POL(ifrm(x1, x2, x3)) = x3   
POL(nil) = [5]   
POL(rm(x1, x2)) = x2   
POL(s(x1)) = [5]   
POL(true) = 0   

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
purge(nil) → nil
purge(add(z0, z1)) → add(z0, purge(rm(z0, z1)))
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
Defined Rule Symbols:

eq, rm, ifrm, purge

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
We considered the (Usable) Rules:

rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
And the Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(EQ(x1, x2)) = 0   
POL(IFRM(x1, x2, x3)) = [2]x3   
POL(PURGE(x1)) = x12   
POL(RM(x1, x2)) = [2]x2   
POL(add(x1, x2)) = [2] + x2   
POL(c3(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c7(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(eq(x1, x2)) = 0   
POL(false) = 0   
POL(ifrm(x1, x2, x3)) = [1] + x3   
POL(nil) = 0   
POL(rm(x1, x2)) = [1] + x2   
POL(s(x1)) = 0   
POL(true) = 0   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
purge(nil) → nil
purge(add(z0, z1)) → add(z0, purge(rm(z0, z1)))
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
Defined Rule Symbols:

eq, rm, ifrm, purge

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
We considered the (Usable) Rules:

rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
And the Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(EQ(x1, x2)) = 0   
POL(IFRM(x1, x2, x3)) = [2]x3   
POL(PURGE(x1)) = [2]x12   
POL(RM(x1, x2)) = [3] + [2]x2   
POL(add(x1, x2)) = [2] + x2   
POL(c3(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c7(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(eq(x1, x2)) = 0   
POL(false) = 0   
POL(ifrm(x1, x2, x3)) = x3   
POL(nil) = 0   
POL(rm(x1, x2)) = x2   
POL(s(x1)) = 0   
POL(true) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
purge(nil) → nil
purge(add(z0, z1)) → add(z0, purge(rm(z0, z1)))
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
Defined Rule Symbols:

eq, rm, ifrm, purge

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

(9) CdtKnowledgeProof (EQUIVALENT transformation)

The following tuples could be moved from S to K by knowledge propagation:

RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
purge(nil) → nil
purge(add(z0, z1)) → add(z0, purge(rm(z0, z1)))
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
Defined Rule Symbols:

eq, rm, ifrm, purge

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

(11) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
We considered the (Usable) Rules:

rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
And the Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(EQ(x1, x2)) = x1   
POL(IFRM(x1, x2, x3)) = [2]x2·x3   
POL(PURGE(x1)) = [2]x12   
POL(RM(x1, x2)) = x1 + [2]x1·x2   
POL(add(x1, x2)) = [2] + x1 + x2   
POL(c3(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c6(x1)) = x1   
POL(c7(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(eq(x1, x2)) = 0   
POL(false) = 0   
POL(ifrm(x1, x2, x3)) = x3   
POL(nil) = 0   
POL(rm(x1, x2)) = x2   
POL(s(x1)) = [2] + x1   
POL(true) = 0   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

eq(0, 0) → true
eq(0, s(z0)) → false
eq(s(z0), 0) → false
eq(s(z0), s(z1)) → eq(z0, z1)
rm(z0, nil) → nil
rm(z0, add(z1, z2)) → ifrm(eq(z0, z1), z0, add(z1, z2))
ifrm(true, z0, add(z1, z2)) → rm(z0, z2)
ifrm(false, z0, add(z1, z2)) → add(z1, rm(z0, z2))
purge(nil) → nil
purge(add(z0, z1)) → add(z0, purge(rm(z0, z1)))
Tuples:

EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
S tuples:none
K tuples:

PURGE(add(z0, z1)) → c9(PURGE(rm(z0, z1)), RM(z0, z1))
IFRM(true, z0, add(z1, z2)) → c6(RM(z0, z2))
IFRM(false, z0, add(z1, z2)) → c7(RM(z0, z2))
RM(z0, add(z1, z2)) → c5(IFRM(eq(z0, z1), z0, add(z1, z2)), EQ(z0, z1))
EQ(s(z0), s(z1)) → c3(EQ(z0, z1))
Defined Rule Symbols:

eq, rm, ifrm, purge

Defined Pair Symbols:

EQ, RM, IFRM, PURGE

Compound Symbols:

c3, c5, c6, c7, c9

(13) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(14) BOUNDS(O(1), O(1))